package cn.golxen.commons.entity;

import lombok.AllArgsConstructor;
import lombok.Data;
import lombok.NoArgsConstructor;

@Data
@AllArgsConstructor
@NoArgsConstructor
public class Result {
    private Integer code;
    private String message;
    private Object data;

    public static Result successResult(Object data){
        Result result=new Result(200,"成功");
        result.setData(data);
        return result;
    }
    public Result(Integer code, String message){
        this(code,message,null);
    }
}
